package com.tuniu.agents.common.filter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

@Configuration
public class WebConfig implements WebMvcConfigurer {

    @Autowired
    private ConversationIdArgumentResolver conversationIdResolver; // Resolver for conversation ID

    @Autowired
    private UserIdArgumentResolver userIdResolver; // Resolver for user ID

    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
        resolvers.add(conversationIdResolver); // Add conversation ID resolver
        resolvers.add(userIdResolver); // Add user ID resolver
    }
}
